'''
Created on Mar 6, 2010

@author: Nick Heiner
'''
from models import Item
from Utils import render
from BaseHandler import BaseHandler

class MainPage(BaseHandler):
    def body(self):
        self.header('Cornell Store', BaseHandler.HOME)
        
        items = Item.all().order("name")
        
        template_values = {'items': items,
                           'headers': ['Name', 'Price', 'In Stock']}
        render('Views/table.html', self, template_values)
        self.footer()